﻿@model  IEnumerable<PinLayoutMVC.Models.Question>
@{
    ViewBag.Title = "Form";
}

<h2>Form</h2>


<fieldset>
@using (Html.BeginForm("UpdateRanks", "MyController")) {
     @for (int i = 0; i < Model.Count(); i++) {
         PinLayoutMVC.Models.Question item = Model.Select(m => m.ID == i);
       <tr>
        <td>
            @Html.TextBoxFor(m => m.D, new { @class = "NarrowTextBox" })
        </td>
        <td>
            @Model.DbSelections[i].Rank (works!), @item.ItemName<br />
        </td>
       </tr>
    }
    <input type="submit" value="Update" name="updateaction"  class="StandardButton"/>
</table>
}
</fieldset>
